package com.xjscrm.console.mapper;

import com.xjscrm.common.entity.DeviceGroupRelation;
import com.xjscrm.console.param.operatePlan.DeviceGroupRelationQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DeviceGroupRelationMapper {
    List<DeviceGroupRelation> deviceGroupRelationList(DeviceGroupRelationQuery deviceGroupRelationQuery);


    int countDeviceGroupRelationByGroupId(@Param("groupId") Long id, @Param("merId") Long merId);

    void deleDeviceGroupRelation(@Param("id") Long id, @Param("merId") Long merId);


    void addDeviceGroupRelation(DeviceGroupRelation deviceGroupRelation);

    int countDeviceGroupRelationByGroupIdAndDeviceIds(@Param("groupId") Long id, @Param("merId") Long merId, @Param("deviceUniqueIds") List<Long> childOwnDeviceUniqueIds);
}
